# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gnome-photos
pkgver=3.34.2
pkgrel=0
pkgdesc="Access, organize and share your photos on GNOME"
url="https://wiki.gnome.org/Apps/Photos"
arch="all !s390x !mips !mips64" # Limited by gegl-dev
license="GPL-3.0-or-later"
depends="gsettings-desktop-schemas tracker-miners"
makedepends="meson babl-dev cairo-dev gtk+3.0-dev gexiv2-dev glib-dev
	gnome-online-accounts grilo-dev gsettings-desktop-schemas-dev
	libdazzle-dev libgdata-dev libjpeg-turbo-dev libpng-dev tracker-dev
	dbus-dev gegl-dev geocode-glib-dev gfbgraph-dev itstool"
options="!check" # https://gitlab.gnome.org/GNOME/gnome-photos/issues/140
subpackages="$pkgname-lang $pkgname-doc"
source="https://download.gnome.org/sources/gnome-photos/${pkgver%.*}/gnome-photos-$pkgver.tar.xz"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		-Ddogtail=false \
		. output
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

sha512sums="6315fb8e7623de48a42f1b47a2935c80f8f9f6db1ab724d1857697f673c4ca0d5ca1afa5c0d147455c3c0ad0224b85b52a220b1dd39a1409804bb75794d0a04b  gnome-photos-3.34.2.tar.xz"
